package com.vibration.web.controller.baseinfo;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.vibration.baseinfo.domain.CzCalculateTxValueExcel;
import com.vibration.baseinfo.domain.CzGroundWaterData;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.vibration.common.annotation.Log;
import com.vibration.common.core.controller.BaseController;
import com.vibration.common.core.domain.AjaxResult;
import com.vibration.common.enums.BusinessType;
import com.vibration.baseinfo.domain.CzCalculateTxValue;
import com.vibration.baseinfo.service.ICzCalculateTxValueService;
import com.vibration.common.utils.poi.ExcelUtil;
import com.vibration.common.core.page.TableDataInfo;

/**
 * tx计算值列Controller
 * 
 * @author Mr_Wu
 * @date 2023-03-07
 */
@RestController
@RequestMapping("/baseinfo/calculateTxValue")
public class CzCalculateTxValueController extends BaseController
{
    @Autowired
    private ICzCalculateTxValueService czCalculateTxValueService;



    /**
     * 导出tx计算值列列表
     */
    @PreAuthorize("@ss.hasPermi('baseinfo:calculateTxValue:export')")
    @Log(title = "tx计算值列", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, Long calculateId)
    {
        List<CzCalculateTxValue> list = czCalculateTxValueService.selectCzCalculateTxValueList(calculateId);
        ExcelUtil<CzCalculateTxValue> util = new ExcelUtil<CzCalculateTxValue>(CzCalculateTxValue.class);
        util.exportExcel(response, list, "tx计算值列数据");
    }

    @PostMapping("/importTemplate")
    public void importTemplate(HttpServletResponse response)
    {
        ExcelUtil<CzCalculateTxValueExcel> util = new ExcelUtil<CzCalculateTxValueExcel>(CzCalculateTxValueExcel.class);
        util.importTemplateExcel(response, "Tx温度数据");
    }


}
